package com.github.kotvertolet.youtubejextractor.models.newModels;

import com.google.gson.annotations.SerializedName;
import ohos.utils.Parcel;
import ohos.utils.Sequenceable;

import java.io.Serializable;

public class PlayerErrorMessageRenderer implements Sequenceable, Serializable {


    @SerializedName("reason")
    private Reason reason;

    @SerializedName("thumbnail")
    private Thumbnail thumbnail;

    @SerializedName("icon")
    private Icon icon;

    @SerializedName("subreason")
    private Subreason subreason;


    public static final Sequenceable.Producer<PlayerErrorMessageRenderer> CREATOR = new Sequenceable.Producer<PlayerErrorMessageRenderer>() {
        @Override
        public PlayerErrorMessageRenderer createFromParcel(Parcel parcel) {
            // Initialize an instance first, then do customized unmarshlling.
            PlayerErrorMessageRenderer PlayerErrorMessageRenderer = new PlayerErrorMessageRenderer();
            PlayerErrorMessageRenderer.unmarshalling(parcel);
            return PlayerErrorMessageRenderer;
        }
    };

    @Override
    public boolean marshalling(Parcel parcel) {
        parcel.writeSequenceable(this.reason);
        parcel.writeSequenceable(this.thumbnail);
        parcel.writeSequenceable(this.icon);
        parcel.writeSequenceable(this.subreason);
        return true;
    }

    @Override
    public boolean unmarshalling(Parcel parcel) {
        parcel.readSequenceable(this.reason);
        parcel.readSequenceable(this.thumbnail);
        parcel.readSequenceable(this.icon);
        parcel.readSequenceable(this.subreason);
        return true;
    }

    @Override
    public String toString() {
        return "PlayerErrorMessageRenderer{" +
                "reason=" + reason +
                ", thumbnail=" + thumbnail +
                ", icon=" + icon +
                ", subreason=" + subreason +
                '}';
    }

    public Reason getReason() {
        return reason;
    }

    public void setReason(Reason reason) {
        this.reason = reason;
    }

    public Thumbnail getThumbnail() {
        return thumbnail;
    }

    public void setThumbnail(Thumbnail thumbnail) {
        this.thumbnail = thumbnail;
    }

    public Icon getIcon() {
        return icon;
    }

    public void setIcon(Icon icon) {
        this.icon = icon;
    }

    public Subreason getSubreason() {
        return subreason;
    }

    public void setSubreason(Subreason subreason) {
        this.subreason = subreason;
    }
}
